/*
 * @Author: C.
 * @Date: 2023-12-19 11:45:44
 */
import http from './http'
import WebSocketClient from './webSocket'
import { projectConfig } from '@/config/project-config'
import { GET_GITHUB_DATA_URL } from '@/config/index'
import AppStorage from '@/utils/cache/index'
export function getDomain() {
  // projectConfig
  // if (AppStorage.get('baseURL')) {
  //   return AppStorage.get('baseURL')
  // } else if (projectConfig.baseURL) {
  //   return projectConfig.baseURL
  // }
  // console.log(GET_GITHUB_DATA_URL)

  return 'http://192.168.1.66:8088'
}
export function gethttpUrl() {
  // projectConfig
  const domain = getDomain()
  const prefix = '/api'
  return domain + prefix
}

export { http, WebSocketClient }
